// 获取意见列表
export function tableList(token, data) {
    return fetch("https://api.hiehie.top:6001/contact", {
        method: "GET",
        headers: {
            authorization: token,
        },
    }).then((res) => res.json());
}
// 删除意见
export function deleteItem(data) {
    console.log(data);
    return fetch("https://api.hiehie.top:6001/contact/" + data.id, {
        method: "DELETE",
    });
}

// 编辑意见
export function editItem(data) {
    console.log(data);
    return fetch("https://api.hiehie.top:6001/contact", {
        method: "POST",
        headers: {
            "Content-Type": "application/json",
        },
        body: JSON.stringify(data),
    });
}
